package com.miaow.websocketdemo1.demos.config;

public enum WebState {
    /**
     * 连接成功
     */
    CONNECTED("200","连接成功"),
    /**
     * 连接失败
     */
    DISCONNECTED("400","连接失败"),
    /**
     * 连接中
     */
    CONNECTING("199","正在连接"),
    /**
     * 断开连接
     */
    DISCONNECTING("401","连接已断开"),

    /**
     * 未知错误
     */

    UNKNOWN_ERROR("-1","未知错误"),

    /**
     * 成功
     */
    SUCCESS("200","成功"),
    /**
     * 失败
     */
    FAIL("400","失败"),
    /**
     * 参数不合法
     */
    PARAM_ERROR("201","参数不合法"),

    /**
     * 数据库异常
     */
    DATABASE_ERROR("202","数据库异常")


    ;


    /**
     * 错误码
     */
    private String state;
    /**
     * 错误消息
     */
    private String msg;
    WebState(String state, String msg) {
        this.state = state;
        this.msg = msg;
    }

    public String getState() {
        return state;
    }

    public String getMsg() {
        return msg;
    }
}
